package com.baihui.taobao.action;

import com.baihui.taobao.db.TPSessionDAO;
import com.opensymphony.xwork2.ActionSupport;

public class UpdatePayUserStatusAction extends ActionSupport {

	private static final long serialVersionUID = 7803674731599166199L;
	public String baihuiId;
	public String appName;
	public int finish;

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public int getFinish() {
		return finish;
	}

	public void setFinish(int finish) {
		this.finish = finish;
	}

	public String getBaihuiId() {
		return baihuiId;
	}

	public void setBaihuiId(String baihuiId) {
		this.baihuiId = baihuiId;
	}

	@Override
	public String execute() throws Exception {

		TPSessionDAO userDAO = new TPSessionDAO();
		userDAO.updateAndInsert(
				"update topsession set status = 1 where baihuiuser= ? and appName = ? ",
				new Object[] { baihuiId, appName });
		// 完成实施的标志
		finish = 1;
		return SUCCESS;
	}

}
